home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / libs / readline / tilde.h < prev    next >
C/C++ Source or Header  |  1995-09-22  |  2KB  |  47 lines

  1. /* tilde.h: Externally available variables and function in libtilde.a. */
  2.  
  3. #if !defined (__TILDE_H__)
  4. #  define __TILDE_H__
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. /* Function pointers can be declared as (Function *)foo. */
  11. #if !defined (__FUNCTION_DEF)
  12. #  define __FUNCTION_DEF
  13. typedef int Function ();
  14. typedef void VFunction ();
  15. typedef char *CPFunction ();
  16. typedef char **CPPFunction ();
  17. #endif /* _FUNCTION_DEF */
  18.  
  19. /* If non-null, this contains the address of a function to call if the
  20.    standard meaning for expanding a tilde fails.  The function is called
  21.    with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
  22.    which is the expansion, or a NULL pointer if there is no expansion. */
  23. extern CPFunction *tilde_expansion_failure_hook;
  24.  
  25. /* When non-null, this is a NULL terminated array of strings which
  26.    are duplicates for a tilde prefix.  Bash uses this to expand
  27.    `=~' and `:~'. */
  28. extern char **tilde_additional_prefixes;
  29.  
  30. /* When non-null, this is a NULL terminated array of strings which match
  31.    the end of a username, instead of just "/".  Bash sets this to
  32.    `:' and `=~'. */
  33. extern char **tilde_additional_suffixes;
  34.  
  35. /* Return a new string which is the result of tilde expanding STRING. */
  36. extern char *tilde_expand ();
  37.  
  38. /* Do the work of tilde expansion on FILENAME.  FILENAME starts with a
  39.    tilde.  If there is no expansion, call tilde_expansion_failure_hook. */
  40. extern char *tilde_expand_word ();
  41.  
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45.  
  46. #endif /* __TILDE_H__ */
  47.